<%@ page pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>
<%@ taglib uri="http://www.springframework.org/security/tags" prefix="security" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<security:authorize ifAnyGranted="ROLE_SUPERVISOR,ROLE_33H46GZ4GDWDKQ50DWU5">
<div id="depts" class="btn-group"></div>
<div class="input-append input-prepend">
<span class="add-one"><i class="icon-calendar"></i></span>
<input type="text" id="datepicker" name="usedate" class="datepicker" readOnly /><button type="button" class="btn btn-primary" id="compbtn">综合日报</button>
</div>

<form action="forwardstore/forward-store!fromExcel"
          enctype="multipart/form-data" 
		  method="post"
		  target="pdtframe"
		  class="form-inline"
		  >		
		 <div class="input-append input-prepend">
		 <span class="add-one"><i class="icon-calendar"></i></span>
		 <input name="usedate" id="dueDate" type="text" class="datepicker" readonly />
         <input type="file" name="upLoad" /><button class="btn btn-primary" type="submit">导入前期结存</button>
         </div>  
</form>
<div class="input-append input-prepend">
   <form id="storeform">
    <select name="year">
        <option value="2013">2013</option>
    </select>年
             
    <select name="month">
      <c:forTokens items="1,2,3,4,5,6,7,8,9,10,11,12" delims="," var="m">
        <option value="${m}">${m}</option>
      </c:forTokens>
    </select>月
    <button class="btn btn-info" type="button" onclick="calcateStore()">计算结存</button>
   </form>          
</div>

</security:authorize>
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>标题</th>
<th width="150">制作者</th>
<th width="150">部门</th>
<th width="200">创建日期</th>
<th width="200">修改日期</th>
<th>管理</th>
</tr>
<tr>
<td colspan="5">
<button class="btn btn-success" onclick="newOne();">
<i class="icon-plus"></i>新增报表
</button>
</td>
</tr>
</thead>
<tbody>
   <c:forEach items="${pager.rows}" var="item">
     <tr class="${item.finished?"info":""}">
       <td>
       <button class="btn btn-small btn-${item.finished?"inverse":"success"}" onclick="showOne('${item.id}');">
       		   <i class="icon-${item.finished?"lock":"edit"}"></i>
                  ${item.finished?"查看":" 编辑 "}                    
         </button>                     
       </td>
       <td>${item.maker.username}[${item.maker.localName}]</td>
       <td>
          ${item.department.name}
       </td>
       <td>
       
       ${item.createDate}
       </td>       
       
       <td>
         ${item.updateDate}
      
        </td>
      
       <td>
       <a href="#" onclick="removeOne('${item.id}')">
         <i class="icon-remove"></i>
       </a>
       </td>
     </tr>
   </c:forEach>
</tbody>
<tfoot>
  <tr>
    <td colspan="4">
      ${pager.pagination}
    </td>
  </tr>
</tfoot>
</table>

<script src="scripts/apps/reporter/list.js" type="text/javascript"></script>
<script src="scripts/apps/reporter/daily/list.js" type="text/javascript"></script>